<!DOCTYPE html>
<html>
<head>
    <title>工装周期性检测计划</title>
    #parse("sys/header.html")
</head>
<style>
    ::-webkit-scrollbar{
        width: 10px;
        height: 10px;
    }
    ::-webkit-scrollbar-thumb{
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
        background: #a8a5a5;
    }
</style>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.planName" @on-enter="query" placeholder="计划名称"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                <i-button type="info" @click="exportData"><i class="fa fa-hand-o-up"></i>&nbsp;导出执行情况</i-button>
                <i-button type="info" @click="submitApprove"><i class="fa fa-plus"></i>&nbsp;提交审核</i-button>
                <i-button type="info" @click="apply"><i class="fa fa-pencil-square-o"></i>&nbsp;审核</i-button>
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                <!--<i-button type="info" @click="generateMaintenanceTicket"><i class="fa fa-plus"></i>&nbsp;生成维护工单</i-button>-->
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>
    <!-- 工装周期性检测工单月份选择区域 -->
    <div id="selectWeekOfYearLayer" style="padding: 20px;display: none">
        <i-form>
            <Form-item label="工单月次">
                <Date-picker type="month" v-model="generateMaintenanceTicketDate"
                             placeholder="请选择在第几周生成工单"></Date-picker>
            </Form-item>
        </i-form>
    </div>
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="toolsCheckPlan" :rules="ruleValidate" :label-width="100">
            <Row>
                <i-col span="9">
                    <Form-item label="计划名称" prop="planName">
                        <i-input v-model="toolsCheckPlan.planName" class="form-input" placeholder="请输入计划名称"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="8" offset="1">
                    <Form-item label="关联产线" prop="devLineName">
                        <i-input type="text" v-model="toolsCheckPlan.devLineName" icon="md-arrow-dropdown-circle"
                                 readonly="readonly"
                                 @on-click="showLine" placeholder="点击选择关联产线"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="9">
                    <Form-item label="开始时间" prop="startDate">
                        <Date-picker type="date" v-model="toolsCheckPlan.startDate" class="form-input"
                                     placeholder="请选择检测计划开始时间"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="8" offset="1">
                    <Form-item label="结束时间" prop="endDate">
                        <Date-picker type="date" v-model="toolsCheckPlan.endDate" class="form-input"
                                     placeholder="请选择检测计划结束时间" style="width: 100%"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="9">
                    <Form-item label="是否沿用" prop="isNewly">
                        <Radio-group v-model="toolsCheckPlan.isNewly">
                            <Radio label="1"><span>是</span></Radio>
                            <Radio label="0"><span>否</span></Radio>
                        </Radio-group>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="8">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="toolsCheckPlan.remark" placeholder="请输入备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
    <!-- 审核表单区域 -->
    <div id="reviewLayer" style="padding: 20px;display: none">
        <i-form :model="approveParam" :label-width="80">
            <Form-item label="审核状态：">
                <Radio-group v-model="approveParam.status">
                    <Radio :label="1"><span>通过</span></Radio>
                    <Radio :label="2"><span>不通过</span></Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="备注：">
                <i-input type="textarea" v-model="approveParam.remark" :rows="3" placeholder="请输入..."></i-input>
            </Form-item>
        </i-form>
    </div>
</div>
<!-- 车间产线选择树 -->
<div id="categoryLayer" style="display: none;padding:10px;">
    <ul id="categoryTree" class="ztree"></ul>
</div>
<script src="${rc.contextPath}/js/tools/toolscheckplan.js?_${date.systemTime}"></script>
</body>
<style>
    .form-input {
        width: 90%;
        padding-top: 0.5%;
    }
</style>
</html>
